Skip to content

Publish repos with no origin, and run interactive OpenCode turns on opencode serve - #1684

Merged
currentbits merged 2 commits into
mainfrom
coder/forge-publish-and-opencode-serve
Oct 19, 2026
Merged

currentbits merged 2 commits into
mainfrom
coder/forge-publish-and-opencode-serve

Conversation

@currentbits

Copy link
Copy Markdown
Owner

These two features were merged into a local main on 2026-10-18 and never reached GitHub. #1671 and #1678 shipped smaller parts of #451 and #456, and those issues were closed, but these parts were left behind. This PR finishes both.

Changes

  • OpenCode turns ask before acting (Adapter upgrades from the provider-CLI deep-dives #451 item 3). Local interactive OpenCode turns now start a private opencode serve for each turn instead of opencode run, the same way Codex app-server works. Its SSE events are converted to the run --format json shapes the runner already parses. In default mode OpenCode asks before edits and shell commands, and each ask shows up as a permission card. Full access answers every ask with "once". Solenta's MCP servers are passed in through OPENCODE_CONFIG_CONTENT, so the user's config file is never written. Workflow, ask and commit-message turns, and ssh/WSL projects, still use opencode run.
  • Publish (Bitbucket and Azure DevOps as first-class forges #456). If a thread's repo has no origin, the next-git-action button shows Publish instead of Create PR. The dialog lists only forges you're signed in to (GitHub, GitLab, Bitbucket, Azure DevOps) and suggests the project folder's name. Publishing creates the repo, adds it as origin and pushes. Because the whole history leaves the machine, the outbound secret scan covers all of it first.
  • Stopping a run that still has open permission prompts now clears awaitingInput.

Verification

  • Rebased onto origin/main at 32cee55. About 10 hunks conflicted, and in every one only one side changed anything (adding exports, comments, or new blocks).
  • tsc and vite build are clean.
  • npm run test:renderer: 3166 pass, 0 fail.
  • npm run test:electron, with inherited CODER_* variables stripped and only node on PATH: 4950 pass, 0 fail, 0 cancelled.
  • Not tested: a live OpenCode turn, or a live Publish to any forge. The serve adapter was checked against a recorded opencode 1.19.3 SSE fixture.

🤖 Generated with Claude Code

Willem and others added 2 commits October 19, 2026 09:39
…rds (#451)

Local interactive turns spawn a per-turn private `opencode serve` (like
Codex app-server) instead of `opencode run`: SSE events are translated to
the run --format json shapes the runner already parses. Default mode asks
before edits and shell commands and routes each permission.asked to the
permission card; full access answers "once". Solenta MCP servers ride in
via OPENCODE_CONFIG_CONTENT, so nothing is written to the user's config.
Workflow / ask / commitmsg turns and ssh/WSL projects stay on `opencode run`.

Stopping a run with open prompts now clears awaitingInput.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re DevOps (#456)

When the thread's repo has no `origin`, the next-git-action button offers
Publish instead of Create PR. The dialog lists only forges that are signed
in, suggests the project folder's name, creates the repo, adds it as
origin and pushes. The outbound secret scan covers the whole history first,
since all of it leaves the machine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T07:46:39.780748Z 407acd9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 407acd9be9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread electron/publish.js
// glab may already have added origin; only add when it is still missing.
const now = (await git(root, ["remote"])).split("\n").map((s) => s.trim());
if (!now.includes("origin")) await git(root, ["remote", "add", "origin", created.remoteUrl]);
await git(root, ["push", "-u", "origin", branch]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Authenticate the initial Bitbucket push

When Bitbucket is marked ready using the supported SOLENTA_BITBUCKET_ACCESS_TOKEN or email/API-token variables, the REST request creates the repository successfully, but this generic git push does not translate those credentials into Git authentication. Since gitTryAsync also disables terminal prompting, users without separately configured Git credentials are left with a newly created remote and a failed publish; pass the Bitbucket authorization to Git, for example through an HTTP extra header or temporary credential helper.

Useful? React with 👍 / 👎.

@currentbits
currentbits merged commit 98ae19a into main Oct 19, 2026
0 of 6 checks passed
@currentbits
currentbits deleted the coder/forge-publish-and-opencode-serve branch October 19, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant